<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
  <div id="Application" style="text-align: center;">
    <h1>这里是模板的内容：{{ count }}次点击</h1>
    <h1 v-once>这里是模板的内容：{{ count }}次点击</h1>
    <h1 v-once>这里是模板的内容：{{ countHTML }}次点击</h1>
    <h1 v-once>这里是模板的内容：<span v-html="countHTML"></span>次点击</h1>
    
    <h1 v-bind:id="id1">这里是模板的内容：{{ count + 10 }}次点击</h1>

    <button v-on:click="clickButton">按钮</button>
  </div>

  <script>
    const {createApp, ref} = Vue
    let config = {
      setup() {
        const count = ref(0)
        const countHTML = ref('<span style="color: red;">0</span>')
        const clickButton = () => {
          count.value++
        }
        const id1 = ref('h1')
        return { 
          count,
          clickButton,
          countHTML,
          id1
        }
      }
    }
    createApp(config).mount('#Application')
  </script>

  <style>
    #h1 {
      color: red;
    }
  </style>
</body>
</html>